﻿namespace GameLib.Games
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public struct MatcherStruct<T> where T : IMod
    {
        public MatcherStruct(IModMatcher matcher)
            : this()
        {
            Matcher = matcher;
        }

        public MatcherStruct(IModMatcher matcher, T match)
            : this(matcher)
        {
            Match = match;
        }

        public bool ContainsMatch
        {
            get
            {
                return (Match != null);
            }
        }

        public IModMatcher Matcher
        {
            get;
            private set;
        }

        public T Match
        {
            get;
            private set;
        }
    }

    public interface IModMatcherResolver<T> where T : IMod
    {
        IList<MatcherStruct<T>> Resolve(IModMatcher matcher, IModCollection<T> mods);
    }
}
